import { IForm, Ibtn } from '@/base-ui/form/types'

export const formConfig: IForm = {
  labelWidth: '100px',
  formConfig: [
    {
      field: 'id',
      type: 'input',
      label: 'id',
      placeholder: '请输入id'
    },
    {
      field: 'name',
      type: 'input',
      label: '用户名',
      rules: [{ required: true, message: '请输入用户名', trigger: 'change' }],
      placeholder: '请输入用户名'
    },
    {
      field: 'realname',
      type: 'input',
      label: '真实姓名',
      // rules: [],
      placeholder: '请输入真实姓名'
    },
    {
      field: 'cellphone',
      type: 'input',
      label: '电话号码',
      // rules: [],
      placeholder: '请输入电话号码'
    },
    {
      field: 'enable',
      type: 'select',
      label: '用户状态',
      placeholder: '选择你用户状态',
      options: [
        { label: '启用', value: 1 },
        { label: '禁用', value: 0 }
      ]
    },
    {
      field: 'createAt',
      type: 'datepicker',
      label: '创建时间',
      otherOptions: {
        startPlaceholder: '开始时间',
        endPlaceholder: '结束时间',
        defaultDateValue: [new Date(), new Date()],
        format: 'YYYY-MM-DD'
      }
    }
  ]
}

export const btnConfig: Ibtn[] = [
  {
    btnText: '搜索',
    type: 'default',
    show: true,
    icon: 'Search'
  },
  {
    btnText: '重置',
    type: 'primary',
    show: true,
    icon: 'Refresh'
  }
]
